package application.parcelModule;

public class Parcel {
	int ParcelID;
	String date;
	String type;
	int status;
	int sender;
	int recipient;
	int price;
	int width;
	int height;
	int length;
	int mass;

	/*********************************************************************/
	/*************************** Constructors ***************************/
	/*******************************************************************/

	public Parcel(int id, String date, String type, int status, int sender,
			int recipient, int width, int height, int length, int mass,
			int price) {

		super();
		this.ParcelID = id;
		this.date = date;
		this.type = type;
		this.status = status;
		this.sender = sender;
		this.recipient = recipient;
		this.height = height;
		this.width = width;
		this.length = length;
		this.mass = mass;
		this.price = price;

	}

	public Parcel() {
	}

	/*********************************************************************/
	/********************** Getters 'n' Setters *************************/
	/*******************************************************************/

	public int getParcelID() {
		return ParcelID;
	}

	public String getDate() {
		return date;
	}

	public void setDate(String date) {
		this.date = date;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public int getSender() {
		return sender;
	}

	public void setSender(int sender) {
		this.sender = sender;
	}

	public int getRecipient() {
		return recipient;
	}

	public void setRecipient(int recipient) {
		this.recipient = recipient;
	}

	public int getPrice() {
		return price;
	}

	public void setPrice(int price) {
		this.price = price;
	}

	/*********************************************************************/
	/************************** Methods ***************************/
	/*******************************************************************/

	public int getWidth() {
		return width;
	}

	public void setWidth(int width) {
		this.width = width;
	}

	public int getHeight() {
		return height;
	}

	public void setHeight(int height) {
		this.height = height;
	}

	public int getLength() {
		return length;
	}

	public void setLength(int length) {
		this.length = length;
	}

	public int getMass() {
		return mass;
	}

	public void setMass(int mass) {
		this.mass = mass;
	}

	public void setParcelID(int parcelID) {
		ParcelID = parcelID;
	}

	/**
	 * Cena zostaje obliczona na podstawie masy[kg] oraz wymirow dl[dm],
	 * wys[dm], szer[dm] dane przyblizone do jednostek calkowitych
	 * 
	 * @return
	 */
	public int calculatePrice(int mass, int dl, int wys, int szer) {
		return mass * 2 + 10 + dl + wys + szer;
	}

	/**
	 * Metada toString dla klasy Parcel
	 */
	public String toString() {
		return "Numer paczki " + ParcelID + "\nData nadania: " + date
				+ "\nTyp : " + type + "\nStatus paczki: " + status
				+ "\nAdresa (nadawca) paczki: " + sender
				+ "\nOdbiorca paczki: " + recipient
				+ "\nCena transportu paczki to: " + price;
	}

}
